#ifndef __MINIUTIL_SYS_SYSINFO_H__
#define __MINIUTIL_SYS_SYSINFO_H__

#ifdef WIN32
#include <windows.h>  
#else
#endif

#include <ctime>
#include <string>
#include <map>
#include "miniutil/datatype.h"

namespace miniutil { namespace sys {
    
    class processinfo
    {
    public:
        processinfo()
        {
            mlstchkcputm = 0;
            mlstsystm = 0;
        }
        time_t mlstchkcputm;
        time_t mlstsystm;
    };
    
    class sysinfo
    {
    public:
        static int cur_process_id();
        static int get_process_id(std::string nm);
        static int get_processor_num();
        static int get_process_cpu_usage(int processid);
        static int get_process_memory_usage(int processid, miniutil::m_uint64_t*, miniutil::m_uint64_t*);
        static int get_process_io_bytes(int processid, miniutil::m_uint64_t*, miniutil::m_uint64_t*);
                 
        static std::map<int, processinfo> mallprocessinfos;
    };
    
} }  

#endif
